#include "LibParameter.h"
#include "LibDataConverter.h"
#include <cassert>
#include <iostream>

using namespace std;

struct Test_LibParameter
{
    void test_Parse()
    {
        LibParameter lp;
        assert(lp.svmParameter.svm_type == C_SVC);
        assert(lp.svmParameter.kernel_type == LINEAR);
        assert(lp.svmParameter.gamma == 0.001);
        assert(lp.svmParameter.C == 1);
        lp.parse(" -t 2 wrongP wrongP-t 3 -twrongP 4 -g 0.0001 -c 0.5 ");
        assert(lp.svmParameter.svm_type == C_SVC);
        assert(lp.svmParameter.kernel_type == RBF);
        assert(lp.svmParameter.gamma == 0.0001);
        assert(lp.svmParameter.C == 0.5);
        cout << "Test_LibParameter::test_Parse() done!" << endl;
    }
};


int mainf(int argc, char ** argv)
{
    Test_LibParameter tlp;
    tlp.test_Parse();
    return 0;
}